import http from "../../utils/request";
export interface staffType {
    page: number
    psize: number
    type?: string
    key?: string
}
interface ids {
    ids: number[]
}
export interface staffsType {
    building:buildingsid[]
    cardid:string
    id:number
    mobile:string
    name:string
    photo:string
    sex:number
    type:number
}
interface buildingsid{
    buildingid:number
}
export const staffsList = (data: staffType) => http.get<any>('/staff/list', data)
// 删除
export const staffsDel = (id: number) => http.post<any>('/staff/delete?id=' + id)
// 批量删除
export const staffsDelAll = (ids: ids) => http.post<any>('/staff/deleteall', ids)
// 添加
export const staffsAdd = (data: staffsType) => http.post<any>('/staff/add', data)
// 修改
// 获取楼栋
export const getBuilding = () => http.get<any>('/building/list')
// 获取类型
export const getType = () => http.get<any>('/stafftype/list')